package Filters;

import java.io.IOException;

import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.filter.AbstractRequestLoggingFilter;

import Components.CookieUtil;
import Loggers.MyLogger;

public class MyAbstractRequestLoggingFilter extends AbstractRequestLoggingFilter {

	public MyAbstractRequestLoggingFilter() {
		// TODO Auto-generated constructor stub
		this.setIncludeQueryString(true);
		this.setIncludeClientInfo(true);
	}

	@Override
	protected void afterRequest(HttpServletRequest arg0, String arg1) {
		MyLogger.log(arg1);
	}

	@Override
	protected void beforeRequest(HttpServletRequest arg0, String arg1) {
		MyLogger.log(arg1);
	}

	@Override
	protected void doFilterInternal(HttpServletRequest request,
			HttpServletResponse response, FilterChain filterChain)
			throws ServletException, IOException {
		
		MyLogger.log("doFilterInternal");
		super.doFilterInternal(request, response, filterChain);
	}

	
}
